package com.example.demo.dto.Admin;

import lombok.Data;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.DecimalMin;
import java.math.BigDecimal;
import java.time.LocalDate;

@Data
public class AdminBookkeepingCreationRequestDto {

    @NotNull(message = "类型不能为空")
    private Integer type; // 0: 收入 1: 支出

    @NotNull(message = "记账日期不能为空")
    private LocalDate bookDate;

    private String category;

    @NotNull(message = "金额不能为空")
    @DecimalMin(value = "0.0", inclusive = false, message = "金额必须大于0")
    private BigDecimal price;

    private String remark;
}
